import request from '@/uilts/request'

// 获取公钥
export const getPublicKey = () => request.get(`/security/login/publicKey`)
// 登录
export const getLoginUrl = params => request.post('/security/login/authenticate', params, { _useForm: true })
// 退出登录
export const getLogoutUrl = () => request.post('/logout', {}, { _useForm: true })
// 获取应用资源
export const getResourceUrl = appCode => request.post(`/security/login/getResourceInfo?appCode=${appCode}`, {}, { _useForm: true })
// 获取token
export const applyTokenUrl = appCode => request.post(`/security/jump/${appCode}`, {}, { _useForm: false })
// 从其他系统跳转后登录
export const loginJumpUrl = (token, appCode) => request.post(`/security/login/jump?token=${token}&appCode=${appCode}`, {}, { _useForm: false })
// 获取租户下所有可用应用
export const getAppByTidUrl = () => request.get(`/application/personal/platform/getAppByTid`, {})